package com.hanlp.test;

import javafx.application.Application;
import javafx.geometry.Insets;
import javafx.scene.Scene;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.layout.HBox;
import javafx.scene.layout.Pane;
import javafx.stage.Stage;

public class ImagesT extends Application {

    @Override
    public void start(Stage primarystage){
        Pane pane=new HBox(10);
        pane.setPadding(new Insets(10,10,10,10));
        Image image=new Image("file:/D:\\space\\mayun\\java-gui\\src\\main\\resources\\screenshot-20230615-145200.png");

        ImageView imageView1=new ImageView(image);
        pane.getChildren().add(imageView1);

        ImageView imageView2=new ImageView(image);
        pane.getChildren().add(imageView2);
        // 设置大小
        imageView2.setFitHeight(200);
        imageView2.setFitWidth(100);

        ImageView imageView3=new ImageView(image);
        pane.getChildren().add(imageView3);
        // 设置旋转
        imageView3.setRotate(180);

        Scene scene=new Scene(pane);
        primarystage.setTitle("ShowImage");
        primarystage.setScene(scene);
        primarystage.show();
    }


    public static void main(String[] args) {
        launch(args);
    }

}
